<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<jsp:include page="../inc.jsp"></jsp:include>
<!DOCTYPE html>
<html>
	<head>
		<link rel="stylesheet" href="${ctx}/css/common.css" />
		<meta http-equiv="X-UA-Compatible" content="edge" />
		<title>付款结算-审核</title>
		<style>
			*{margin:0;padding:0}
		
		.review{
			width:500px;
			height:300px;
			border:1px solid #09a3dc;
			border-radius:10px;
			font-size: 12px;
			font-family: "微软雅黑";
			background:white;
		}
		.review .tip{
			height:40px;
			border-bottom: 1px solid #09a3dc;
			font-size: 16px;
			line-height: 40px;
			padding-left:10px;
		}
		.review .close{
			font-size: 24px;
			float: right;
			padding-right: 10px;
			cursor:pointer;
		}
		.review .message{
			height:90px;
			background:#f2f2f2;
			padding-left:50px;
			line-height: 20px;
			padding-top:10px;
		}
		.review .cashMoney{
			color:red;
			font-weight: 900;
		}
		.review .note span{
			position: relative;
			top:-90px;
			margin-left:10px;
		}
		.review .btn{
			text-align: center;
			margin-top:5px;
		}
		.review .btn button{
			width:90px;
			height:28px;
			font-family: "微软雅黑";
		}
		.review .btn button:hover{
			background:#09a3dc;
			color:white;
			font-weight: 900;
			cursor:pointer;
		}
		.review .btn button:first-child{
			margin-right:30px;
		}
		.review .btn button:last-child{
			margin-left:30px;
		}
   		
		</style>
		
	</head>
	<body>
		<div class='review'>
			<!-- <p class='tip'></p> -->
			<div class='message'>
				<p>提现单号：<span class='cashNo'>${cashNo}</span></p>
				<p>供应商：<span class='orgName'>${param.orgName}</span></p>
				<p>申请日期：<span class='applyTime'>${param.applyTime}</span></p>
				<p>提现金额：<span class='cashMoney'>￥${param.cashMoney}</span></p>
			</div>
			<div class='note'>
				<span>备注：</span>
				<textarea class='noteText' style='width:430px;height:100px;margin-top:10px'></textarea>
			</div>
			<div class='btn'>
				<button id='btn1' class="add_minus">通过</button>
				<button id='btn2' class="backOne">不通过</button>
			</div>
		</div>
	</body>
	<script type="text/javascript">
		//通过
		$('#btn1').click(function(){
			var noteText = $('.noteText').val()
			if(noteText == null || noteText == "undefined"){
				noteText = "";
			}
			 $.ajax({
					url:"${ctx}/statement/audit/${cashNo}?status=1",
					type:"post",
					async:true,
					data:{remarks:noteText},
					success:function(data){
						var index = parent.layer.getFrameIndex(window.name);//获取弹窗索引
						parent.layer.close(index);//关闭弹窗
					}
				}); 
		})
		//未通过
		$('#btn2').click(function(){
			var noteText = $('.noteText').val()
			if(noteText == null || noteText == "undefined"){
				noteText = "";
			}
			 $.ajax({
					type:"post",
					url:"${ctx}/statement/audit/${cashNo}?status=0",
					data:{remarks:noteText},
					success:function(data){
						var index = parent.layer.getFrameIndex(window.name);//获取弹窗索引
						parent.layer.close(index);//关闭弹窗									
					}
				}); 
		})
		
	</script>
</html>